﻿using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using LM.Negocio.Objetos;

namespace LM.Repositorios.Maps
{
    public class TelefoneMap : EntityTypeConfiguration<Telefone>
    {
        public TelefoneMap()
        {
            this.HasKey(m => m.Id);
            this.Property(m => m.Id).HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity).HasColumnName("Id");
            this.Property(m => m.Codigo).HasColumnName("Codigo").IsRequired();
            this.Property(m => m.Ddd).HasColumnName("Ddd").IsRequired();
            this.Property(m => m.Numero).HasColumnName("Numero").IsRequired();
            this.Property(m => m.TipoDeTelefone).HasColumnName("TipoDeTelefone").IsRequired();

            this.ToTable("TELEFONE");
        }
    }
}
